package day04.homework.expand;

public class FactorialDemo {
    public static void main(String[] args) {
        //利用for循环计算：求8的阶乘，并输出
        int fac = 1;
        for (int i = 1; i <= 8; i++) {
            fac*=i;
        }
        System.out.println("8的阶乘为："+fac);
    }
}
